package com.bsb.biz.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.bsb.base.mapper.BsbKnowledgeMapper;
import com.bsb.base.model.BsbKnowledge;
import com.bsb.base.model.BsbKnowledgeExample;

@Service
public class BsbKnowledgeService{
	
	@Resource
	private BsbKnowledgeMapper bsbKnowledgeMapper;
	
	public void addBsbKnowledge(BsbKnowledge bsbKnowledge) {
		bsbKnowledgeMapper.insertSelective(bsbKnowledge);
	}
	
	public void delBsbKnowledgeByUuid(String uuid) {
		bsbKnowledgeMapper.deleteByPrimaryKey(uuid);
	}
	
	public void updateBsbKnowledge(BsbKnowledge bsbKnowledge) {
		bsbKnowledgeMapper.updateByPrimaryKeySelective(bsbKnowledge);
	}
	
	public void updateBsbKnowledgeByExample(BsbKnowledge bsbKnowledge,BsbKnowledgeExample bsbKnowledgeExample){
	    bsbKnowledgeMapper.updateByExampleSelective(bsbKnowledge,bsbKnowledgeExample);
	}
	
	public BsbKnowledge getBsbKnowledgeByUuid(String uuid) {
		return bsbKnowledgeMapper.selectByPrimaryKey(uuid);
	}
	
	public List<BsbKnowledge> getPageBsbKnowledge(BsbKnowledgeExample bsbKnowledgeExample) {
		return bsbKnowledgeMapper.selectPage(bsbKnowledgeExample);
	}
	
	public int countBsbKnowledge(BsbKnowledgeExample bsbKnowledgeExample) {
		return bsbKnowledgeMapper.countByExample(bsbKnowledgeExample);
	}
	
	public List<BsbKnowledge> selectByExample(BsbKnowledgeExample example){
	    return bsbKnowledgeMapper.selectByExample(example);
	}
}
